package com.lagou.homework.stage01.module02.Task3;

/**
 * 手机卡类
 */
public class CardTest {
    public static void main(String[] args) {
        Card c1 = new Card(Type.BIG.getCardType(),01,"hrl","8888",100,100,1000);
        UserInfo ui = new UserInfo(100,1000,100);

        Package mp = new MinPackage(c1.getMoney(),c1.getMin(),100);
        Package fp = new FlowPackage(c1.getMoney(),c1.getFlow());

        c1.show();
        ui.show();
        System.out.println("---------------------------");
        mp.show();
        ((MinPackage) mp).phoneSer(c1.getMin(),Type.BIG.getCardType());
        ((MinPackage) mp).phoneSer(c1.getMin(),Type.SMALL.getCardType());
        ((MinPackage) mp).phoneSer(c1.getMin(),Type.MINI.getCardType());
        System.out.println("---------------------------");
        fp.show();
        ((FlowPackage) fp).internetSer(c1.getFlow(),Type.BIG.getCardType());
        ((FlowPackage) fp).internetSer(c1.getFlow(),Type.SMALL.getCardType());
        ((FlowPackage) fp).internetSer(c1.getFlow(),Type.MINI.getCardType());
    }
}
